how to create table dynamically